package pojo;

import java.util.Collection;
import java.util.Objects;

public class TbPms {
    private Integer pmsId;
    private String pmsName;
    private Collection<TbPmsRole> tbPmsRolesByPmsId;

    public Integer getPmsId() {
        return pmsId;
    }

    public void setPmsId(Integer pmsId) {
        this.pmsId = pmsId;
    }

    public String getPmsName() {
        return pmsName;
    }

    public void setPmsName(String pmsName) {
        this.pmsName = pmsName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbPms tbPms = (TbPms) o;
        return Objects.equals(pmsId, tbPms.pmsId) &&
                Objects.equals(pmsName, tbPms.pmsName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pmsId, pmsName);
    }

    public Collection<TbPmsRole> getTbPmsRolesByPmsId() {
        return tbPmsRolesByPmsId;
    }

    public void setTbPmsRolesByPmsId(Collection<TbPmsRole> tbPmsRolesByPmsId) {
        this.tbPmsRolesByPmsId = tbPmsRolesByPmsId;
    }
}
